package no.awi.wpd.combat.model;

public enum InitiativeStep {

    IMPACT_HITS("Impact hits"),
    ASF("Allways strikes first"),
    IN10("Initiative 10"),
    IN9("Initiative 9"),
    IN8("Initiative 8"),
    IN7("Initiative 7"),
    IN6("Initiative 6"),
    IN5("Initiative 5"),
    IN4("Initiative 4"),
    IN3("Initiative 3"),
    IN2("Initiative 2"),
    IN1("Initiative 1"),
    ASL("Allways strikes last");

    private final String description;

    InitiativeStep(String description) {
        this.description = description;
    }

    public String getDescription() {
        return description;
    }

    public static InitiativeStep fromIn(int initiative) {
        switch (initiative) {
            case 1: return IN1;
            case 2: return IN2;
            case 3: return IN3;
            case 4: return IN4;
            case 5: return IN5;
            case 6: return IN6;
            case 7: return IN7;
            case 8: return IN8;
            case 9: return IN9;
            case 10: return IN10;
            default: throw new IllegalArgumentException("Illegal initiative");
        }
    }
}
